import React from 'react';
import { inject, observer } from 'mobx-react';
import {routerShape} from 'react-router';
import allStore from '../../stores';
import * as mobx from 'mobx';
import {WeaTableNew} from 'comsMobx';
const WeaTable = WeaTableNew.WeaTable;
import MonitorCondition from './Condition';
import {
    WeaTop, WeaTab, WeaLeftTree, WeaLeftRightLayout, WeaSearchGroup,
    WeaRightMenu, WeaPopoverHrm, WeaInput, WeaInputSearch, WeaDialog, WeaSelect, WeaHelpfulTip,
} from 'ecCom'
import * as Util from '../../util/listUtil';

import {WeaErrorPage,WeaTools,WeaDropdown} from 'ecCom';
import {Button,Modal,message,Input,Row,Col} from 'antd';
const { ButtonSelect } = WeaDropdown;

import * as API_MONITOR from '../../apis/monitor';
import {Synergy} from 'weaPortal';

import {WeaLocaleProvider} from 'ecCom';
import {toJS} from "mobx";
const getLabel = WeaLocaleProvider.getLabel;

@inject('wfMonitorStore')
@inject('wfMonitorLogStore')

@observer
class WfMonitor extends React.Component {
    static contextTypes = {
        router: routerShape
    }
    constructor(props){
        super(props);
        this.doInit(this.props);
    }

    varTemp = {
      btns: [],
      leftCom: null,
      rightBtns: [],
      advanceBtns: []
    }
    doInit(props){
        let baseQueryParams = {};
        allStore.wfGlobalStore.setCurrentListSymbol('Monitor');
        const { wfMonitorStore,location } = props;
        const queryParams = location.query || {};
        wfMonitorStore.setUrlParams(queryParams);
        const fromwhere = queryParams.fromwhere || "monitor";
        if(fromwhere !== "monitor"){
            wfMonitorStore.loadCondition();
        }  else if(fromwhere == 'monitor') {
          wfMonitorStore.recoverQueryStore(allStore.wfMonitorIndexStore);
        }
        wfMonitorStore.setLeftLayoutShow(false);
        wfMonitorStore.doSearch(baseQueryParams);
        wfMonitorStore.appendSearchParams(queryParams);
        wfMonitorStore.initDatas();
        wfMonitorStore.loadTree();
        _ListenerCtrl.bind();
    }
    componentDidMount() {
        if(window.location.pathname.indexOf('/spa/workflow/index') > -1)
        document.title = this.props.wfMonitorStore.title;
        _ListenerCtrl.bind();
    }
    componentWillUnmount() {
        this.props.wfMonitorStore.resetCondition();
        this.props.wfMonitorStore.resetTable();
        _ListenerCtrl.unbind();
    }
    componentWillReceiveProps(nextProps) {
        if(window.location.pathname.indexOf('/spa/workflow/index') >= 0 && nextProps.title && document.title !== nextProps.title)
            document.title = nextProps.title;
    }
    shouldComponentUpdate(nextProps, nextState) {
        return true;
    }
    onCollapse = (bool)=>{this.props.wfMonitorStore.setLeftLayoutShow(bool)};
    setShowSearchAd = bool=>{this.props.wfMonitorStore.setShowSearchAd(bool)}
    hideSearchAd = ()=> this.props.wfMonitorStore.setShowSearchAd(false);
    onSearch = v=>{this.props.wfMonitorStore.doSearch()};
    onSearchChange= v=>{this.props.wfMonitorStore.appendFormFields({requestname:{value:v}})};
    render(){
        const { wfMonitorStore } = this.props;
        const { form , condition , monitorLogForm ,monitorLogCondition , tableStore , selectedRowKeys} = wfMonitorStore;
        const {title,loading,urlParams,topTab,topTabCount,searchParams, showSearchAd,showBatchSubmit ,setSelectedRowKeys,leftLayoutShow,setLeftLayoutShow} = wfMonitorStore;
        const { monitorLogShow } = this.props.wfMonitorLogStore;
        const isSingle = window.location.pathname.indexOf('/spa/workflow/index') >= 0;
        const formParams = form.getFormParams() || {};
        const loadingTable = tableStore.loading;
        
        const tabDatas = [{color: "#000000", groupid: "flowAll", showcount: false, title: getLabel(82857,'全部'), createdateselect: 0},
                    {color: "#000000", groupid: "flowTaday", showcount: false, title: getLabel(15537,'今天'), createdateselect: 1},
                    {color: "#000000", groupid: "flowWeek", showcount: false, title: getLabel(15539,'本周'), createdateselect: 2},
                    {color: "#000000", groupid: "flowMonth", showcount: false, title: getLabel(15541,'本月'), createdateselect: 3},
                    {color: "#000000", groupid: "flowSeason", showcount: false, title: getLabel(21904,'本季'), createdateselect: 4},
                    {color: "#000000", groupid: "flowYear", showcount: false, title: getLabel(15384,'本年'), createdateselect: 5}];

         this.varTemp.btns = this.varTemp.rightBtns = this.varTemp.advanceBtns= [];
         this.varTemp.btns = this.getButtons();     
         this.varTemp.rightBtns = this.getRightMenu(); 
         this.varTemp.leftCom = this.getTree();   
         this.varTemp.advanceBtns = this.getTabButtonsAd();
        return(
            <div>
                {isSingle && <WeaPopoverHrm ecId={`${this && this.props && this.props.ecId || ''}_WeaPopoverHrm@2zsipc`} />}
                <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@gyezad`} 
                    collectParams={{favname:title, favouritetype:2}}
                    datas={this.varTemp.rightBtns}>
                    <WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@ci3hwk`}
                        title={title}
                        loading={ loadingTable || loading}
                        icon={Util.getTopIcon(urlParams)}
                        iconBgcolor={Util.getTopIconBgColor(urlParams)}
                        buttons={this.varTemp.btns}
                        buttonSpace={10}
                        showDropIcon={true}
                        dropMenuDatas={this.varTemp.rightBtns}
                    >
                        <WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@k5z2gs`} 
                            leftCom={this.varTemp.leftCom}
                            showLeft={leftLayoutShow}
                            onCollapse={this.onCollapse}
                        >
                                <WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@y46zjf`}
                                    buttonsAd={this.varTemp.advanceBtns}
                                    searchType={['base','advanced']}
                                    searchsBaseValue={formParams.requestname}
                                    setShowSearchAd={this.setShowSearchAd}
                                    hideSearchAd={this.hideSearchAd}
                                    searchsAd={
                                       <MonitorCondition ecId={`${this && this.props && this.props.ecId || ''}_MonitorCondition@13knbk`} queryStore={wfMonitorStore} onEnterSearch={()=>{wfMonitorStore.doSearch();wfMonitorStore.setShowSearchAd(false)}} />
                                    }
                                    showSearchAd={showSearchAd}
                                    datas={tabDatas}
                                    selectedKey={searchParams.createdateselect}
                                    counts={topTabCount}
                                    onSearch={this.onSearch}
                                    onSearchChange={this.onSearchChange}
                                    keyParam="createdateselect"  //主键
                                    countParam="groupid" //数量
                                    onChange={this.switchTab} />
                                {/* 数据table */}
                                <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@qt0qxl`}
                                    comsWeaTableStore={tableStore}
                                    register_table={wfMonitorStore.reLoad} 
                                    hasOrder={true}
                                    needScroll={true} 
                                    className="wf-monitor-tablelist"
                                    getColumns={this.getColumns}/>
                            </WeaLeftRightLayout>
                    </WeaTop>
                </WeaRightMenu>
                <Synergy ecId={`${this && this.props && this.props.ecId || ''}_Synergy@yswsnz`} pathname='/workflow/monitorResult' requestid="-1" />
            </div>
        )
    }

    getColumns = (columns) => {
        const columnsJS = toJS(columns);
        columnsJS.forEach(col => {
            if(col.dataIndex === "unoperators"){
                const title = (
                    <span>
                        <span title={col.title}>
                            { col.title }
                        </span>
                        {<WeaHelpfulTip ecId={`${this && this.props && this.props.ecId || ''}_WeaHelpfulTip@xm9278@${col.dataIndex}`} style={{ marginLeft: 5 }} title={getLabel(516719,"可在【个性化设置】中设置未操作者的显示类型")} placement="top" />}
                    </span>
            )
                col.title = title;
            }
        });
        return columnsJS;
    }

    getTree = () => {
        const { wfMonitorStore , wfMonitorLogStore} = this.props;
        const { leftTree,selectedTreeKey , leftTreeCount ,leftTreeCountType ,forceRender} = wfMonitorStore;
        return (
            <WeaLeftTree ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftTree@gt3al2`}
                forceRender={forceRender}
                datas={mobx.toJS(leftTree)}
                counts={leftTreeCount}
                countsType={leftTreeCountType}
                selectedKeys={[selectedTreeKey]}
                onSearchLabelClick={()=>{
                    wfMonitorStore.setShowSearchAd(false);
                    wfMonitorStore.setSelectedTreeKey("");
                    wfMonitorStore.resetCondition();
                    wfMonitorStore.doSearch();
                }}
                onSelect={(key)=>{
                    wfMonitorStore.setShowSearchAd(false);
                    wfMonitorStore.setSelectedTreeKey(key);
                    wfMonitorStore.setConditionByTree();
                    wfMonitorStore.doSearch();
                    wfMonitorLogStore.showMonitorLog(false);
                }} 
            />
        )
    }

    btnSearch = ()=>{this.props.wfMonitorStore.doSearch(); this.props.wfMonitorStore.setShowSearchAd(false)};
    reset = ()=>{ this.props.wfMonitorStore.resetCondition(); this.props.wfMonitorStore.setConditionByTree();};
    btnCancel = ()=>{this.props.wfMonitorStore.setShowSearchAd(false)}
    getTabButtonsAd() {
        const { wfMonitorStore } = this.props;
        return [
            (<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@1v0uvg@search`} type="primary" onClick={this.btnSearch}>{getLabel(197,'搜索')}</Button>),
            (<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@66gdvs@reset`} type="ghost" onClick={this.reset}>{getLabel(2022,'重置')}</Button>),
            (<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@r2lnz7@cancel`} type="ghost" onClick={this.btnCancel}>{getLabel(31129,'取消')}</Button>)
        ];
    }
    switchTab = (tabKey) => {
        const {wfMonitorStore , wfMonitorLogStore} = this.props;
        const {topTab,condition} = wfMonitorStore;
        wfMonitorStore.setShowSearchAd(false);
        wfMonitorLogStore.showMonitorLog(false);
        condition.length>0 && wfMonitorStore.appendFormFields({createdateselect__createdatefrom__createdateto:{value:[tabKey]}})//是否有高级查询条件，直接当前页刷新没有加载condition
        wfMonitorStore.doSearch({
            createdateselect: tabKey
        });
    }
    //获取右键菜单
    getRightMenu(){
        const { wfMonitorStore , wfMonitorLogStore} = this.props;
        const { tableStore ,btnObj} = wfMonitorStore;
        const selectedRowKeys = tableStore.selectedRowKeys;
        const selectedLen = tableStore.selectedRowKeys.length;
        const current = tableStore.current;

    	let btns = [];
    	btns.push({
            key: "search",
    		icon: <i className='icon-workflow-Right-menu--search'/>,
            content:getLabel(197,'搜索'),
            onClick: key =>{
                wfMonitorStore.doSearch();
                wfMonitorStore.setShowSearchAd(false);
            }
        });
        btns.push({
            key: "batchDelete",
    		icon: <i className='icon-coms-Batch-delete'/>,
            content:getLabel(32136,'批量删除'),
            disabled:btnObj.key!=="batchDelete" || selectedLen<=0,
            onClick: key =>{
                this.batchDelete();
            }
        });
        btns.push({
            key: "log",
    		icon: <i className='icon-coms-Print-log'/>,
            content:getLabel(83,'日志'),
            onClick: key =>{
                this.forwardMonitorLog();
            }
        });
        btns.push({
            key: "back",
    		icon: <i className='icon-coms-Preservation'/>,
            content:getLabel(18360,'强制归档'),
            disabled:btnObj.key!=="batchArchiving" || selectedLen<=0,
            onClick: key =>{
                this.batchArchiving();
            }
        });
        btns.push({
            key:"colSet",
    		icon: <i className='icon-coms-Custom'/>,
            content:getLabel(382660,'显示列定制'),
            onClick: key =>{
                tableStore.setColSetVisible(true);
                tableStore.tableColSet(true);
            }
    	});
    	
    	return btns;
    }
    getButtons() {
        const { wfMonitorStore } = this.props;
        const { tableStore } = wfMonitorStore;
        const selectedRowKeys = tableStore.selectedRowKeys;
        const selectedLen = tableStore.selectedRowKeys.length;
        let btns = [];
        const datas = [
            { key: 'batchDelete',show: getLabel(32136,'批量删除'),selected: true },
            { key: 'batchArchiving', show: getLabel(18360,'强制归档') },
          ];

        btns.push(
            <ButtonSelect ecId={`${this && this.props && this.props.ecId || ''}_ButtonSelect@l77qt6@batch`} 
                datas={datas} 
                btnProps={{disabled:selectedRowKeys.length <= 0}}
                dropdownProps={{trigger:['click']}}
                dropBtnProps={{title:getLabel(384039,"点击切换批量操作")}}
                btnOnClick={key => {
                    if(key === 'batchDelete'){
                        this.batchDelete();
                    }else if(key === 'batchArchiving'){
                        this.batchArchiving();
                    }
                }} 
                menuOnClick={(key, e) => wfMonitorStore.clickButttonDrop(key) }
            />
        );
        return btns;
    }

    //强制归档
    batchArchiving(){
        const { wfMonitorStore } = this.props;
        const { tableStore } = wfMonitorStore;
        const selectedRowKeys = tableStore.selectedRowKeys;
        const current = tableStore.current;
        if(selectedRowKeys.length == 0){
            return;
        }
        let reqids = "";
        selectedRowKeys.map(v=>{
            reqids += v +",";
        })
        reqids = reqids.substring(0,reqids.length-1);
        Modal.confirm({
            title:getLabel(131329,' 信息确认'),
            content:getLabel(24704,' 您确定将这些流程强制归档吗？'),
            onOk() {
                message.loading(getLabel(528546,'正在处理中，请稍后')+'...',0);
                {
                    API_MONITOR.archivingWf({multiRequestIds:reqids}).then((data)=>{
                        message.destroy();
                        if(data.success!=0){
                            message.success(getLabel(528544,' 操作成功！'));
                            wfMonitorStore.doSearch({current});
                        }
                        else{
                            message.error(getLabel(528545,' 操作失败！'));
                        }
                    })
                }
            },
            onCancel() {},
        });
    }

    //批量删除
    batchDelete(){
        const { wfMonitorStore } = this.props;
        const { tableStore } = wfMonitorStore;
        const selectedRowKeys = tableStore.selectedRowKeys;
        const current = tableStore.current;
        if(selectedRowKeys.length == 0){
            return;
        }
        let reqids = "";
        selectedRowKeys.map(v=>{
            reqids += v +",";
        })
        reqids = reqids.substring(0,reqids.length-1);
        Modal.confirm({
            title:getLabel(131329,' 信息确认'),
            content: getLabel(385322,' 你确定要删除选中的记录吗?'),
            onOk() {
                message.loading(getLabel(84024,'正在删除数据，请稍候...'),0);
                {
                    API_MONITOR.deleteWf({multiRequestIds:reqids}).then((data)=>{
                        message.destroy();
                        if(data.success!=0){
                            if(data.success == data.total){
                                //window.workflowMonitorUtil.getMsgContent(data,true,true);
                                message.success(getLabel(20461,' 删除成功！'));
                            }else{
                                window.workflowMonitorUtil.getMsgContent(data,false,true);
                            }
                            wfMonitorStore.doSearch({current});
                        }
                        else{
                            window.workflowMonitorUtil.getMsgContent(data,false,true);
                        }
                    })
                }
            },
            onCancel() {},
        });
    }

    forwardMonitorLog(){
        const { wfMonitorStore } = this.props;
        const {title,condition,form} = wfMonitorStore;
            this.context.router.push({
                pathname: "/main/workflow/monitorLog",
                state: {title,condition,formValue: form && form.getFormDatas()}
            });
        }

    }

export default WeaTools.tryCatch(React,
    props => <WeaErrorPage ecId={`${this && this.props && this.props.ecId || ''}_WeaErrorPage@ce3hw5`} msg={ props.error ? props.error : getLabel(383324,' 对不起，该页面异常，请联系管理员 ')+'！'} />,
    {error: ""}
    )(WfMonitor);

window.workflowMonitorUtil =(function(){
    return {
        //删除
        getMsgContent(data,success,isbatch){
            let successmsg = getLabel(20461,'删除成功！')+data.success+getLabel(18256,'条');
            let errmsg1 = getLabel(20462,'删除失败！');
            let errmsg2 = getLabel(522595,'流程删除附加操作')+getLabel(83071,'执行失败')+'，'+getLabel(20462,'删除失败！');
            let errmsgbatch1 = errmsg1 + (data.fail + data.actionfail) + getLabel(18256,'条');
            let errmsgbatch2 = '('+getLabel(522595,'流程删除附加操作')+getLabel(83071,'执行失败')+data.actionfail+getLabel(18256,'条')+')';
            let msg;
            if(success){
                //msg = (<div><p>{successmsg}</p></div>);
            }else{
                if(data.actionfail != 0){
                    if(isbatch){
                        msg = (<div><p>{successmsg}</p><p>{errmsgbatch1}</p><p>{errmsgbatch2}</p></div>);
                    }else{
                        msg = (<div><p>{errmsg2}</p></div>);
                    }
                }else{
                    if(isbatch){
                        msg = (<div><p>{successmsg}</p><p>{errmsgbatch1}</p></div>);
                    }else{
                        msg = (<div><p>{errmsg1}</p></div>);
                    }

                }
            }
            Modal.confirm({
                title:getLabel(15172,' 系统提示'),
                content:msg
            });
        },
        deleteRequestById(requestid){
            // let getMsgContent = (data,success,isbatch) => {
            //     let successmsg = getLabel(20461,'删除成功！')+data.success+getLabel(386978,'条');
            //     let errmsg1 = getLabel(20462,'删除失败！');
            //     let errmsg2 = getLabel(522595,'流程删除附加操作')+getLabel(83071,'执行失败')+','+getLabel(20462,'删除失败！');
            //     let errmsgbatch1 = errmsg1 + (data.fail + data.actionfail) + getLabel(386978,'条');
            //     let errmsgbatch2 = '('+getLabel(522595,'流程删除附加操作')+getLabel(83071,'执行失败')+data.actionfail+getLabel(386978,'条')+')';
            //     let msg;
            //     if(success){
            //         msg = (<div><p>{successmsg}</p></div>);
            //     }else{
            //         if(data.actionfail != 0){
            //             if(isbatch){
            //                 msg = (<div><p>{successmsg}</p><p>{errmsgbatch1}</p><p>{errmsgbatch2}</p></div>);
            //             }else{
            //                 msg = (<div><p>{errmsg2}</p></div>);
            //             }
            //         }else{
            //             if(isbatch){
            //                 msg = (<div><p>{successmsg}</p><p>{errmsgbatch1}</p></div>);
            //             }else{
            //                 msg = (<div><p>{errmsg1}</p></div>);
            //             }
            //
            //         }
            //     }
            //     Modal.confirm({
            //         title:getLabel(15172,' 系统提示'),
            //         content:msg
            //     });
            // }

            Modal.confirm({
                title:getLabel(131329,' 信息确认'),
                content: getLabel(385321,'你确定要删除这条记录吗?'),
                onOk() {
                    message.loading(getLabel(84024,'正在删除数据，请稍候...'),0);
                    {
                        API_MONITOR.deleteWf({multiRequestIds:requestid}).then((data)=>{
                            message.destroy();
                            if(data.success==1){
                                message.success(getLabel(20461,' 删除成功！'));
                                window._table.reLoad();
                            }
                            else{
                                window.workflowMonitorUtil.getMsgContent(data,false,false);
                            }
                        })
                    }
                },
                onCancel() {},
            });
        },
        //暂停
        stopRequestById(requestid, otherpara, obj){
            Modal.confirm({
                title:getLabel(131329,' 信息确认'),
                content: getLabel(26156,' 您确定要暂停当前流程吗 ')+'？',
                onOk() {
                    message.loading(getLabel(528546,'正在处理中，请稍后')+'...',0);
                    {
                        API_MONITOR.stopWf({multiRequestIds:requestid}).then((data)=>{
                            message.destroy();
                            if(data.success==1){
                                message.success(getLabel(20387,'暂停')+getLabel(25008,'成功')+'！');
                                window._table.reLoad();
                            }
                            else{
                                message.error(getLabel(20387,'暂停')+getLabel(84566,'失败！'));
                            }
                        })
                    }
                },
                onCancel() {},
            });
        },
        //撤销
        cancelRequestById(requestid, otherpara, obj){
            Modal.confirm({
                title:getLabel(131329,' 信息确认'),
                content: getLabel(26157,'您确定要撤销当前流程吗')+'？',
                onOk() {
                    message.loading(getLabel(528546,'正在处理中，请稍后')+'...',0);
                    {
                        API_MONITOR.cancelWf({multiRequestIds:requestid}).then((data)=>{
                            message.destroy();
                            if(data.success==1){
                                message.success(getLabel(23757,'撤销')+getLabel(25008,'成功')+'！');
                                window._table.reLoad();
                            }
                            else{
                                message.error(getLabel(23757,'撤销')+getLabel(84566,'失败！'));
                            }
                        })
                    }
                },
                onCancel() {},
            });
        },
        //启用
        openRequestById(requestid, otherpara, obj){
            Modal.confirm({
                title:getLabel(131329,' 信息确认'),
                content: getLabel(26158,'您确定要启用当前流程吗')+'？',
                onOk() {
                    message.loading(getLabel(528546,'正在处理中，请稍后')+'...',0);
                    {
                        API_MONITOR.openpWf({multiRequestIds:requestid}).then((data)=>{
                            message.destroy();
                            if(data.success==1){
                                message.success(getLabel(31676,'启用')+getLabel(25008,'成功')+'！');
                                window._table.reLoad();
                            }
                            else{
                                message.error(getLabel(31676,'启用')+getLabel(84566,'失败！'));
                            }
                        })
                    }
                },
                onCancel() {},
            });
        },
        //强制归档
        archivingRequestById(requestid, otherpara, obj){
            Modal.confirm({
                title:getLabel(131329,' 信息确认'),
                content:getLabel(24703,' 您确定将该流程强制归档吗？'),
                onOk() {
                    message.loading(getLabel(528546,'正在处理中，请稍后')+'...',0);
                    {
                        API_MONITOR.archivingWf({multiRequestIds:requestid}).then((data)=>{
                            message.destroy();
                            if(data.success==1){
                                message.success(getLabel(528544,' 操作成功！'));
                                window._table.reLoad();
                            }
                            else{
                                message.error(getLabel(528545,' 操作失败！'));
                            }
                        })
                    }
                },
                onCancel() {},
            });
        },
        //强制收回
        repossessedRequestById(requestid, otherpara, obj){
            Modal.confirm({
                title:getLabel(131329,' 信息确认'),
                content:getLabel(126273,' 您确定要强制收回当前流程吗？'),
                onOk() {
                    message.loading(getLabel(528546,'正在处理中，请稍后')+'...',0);
                    {
                        API_MONITOR.repossessedWf({multiRequestIds:requestid}).then((data)=>{
                            message.destroy();
                            if(data.success==1){
                                message.success(getLabel(528544,' 操作成功！'));
                                window._table.reLoad();
                            }else{
                                message.error(getLabel(528545,' 操作失败！'));
                            }

                            if(data.specialAddinoperateMsg) {
                                message.error(data.specialAddinoperateMsg);
                            }
                        })
                    }
                },
                onCancel() {},
            });
        },
        //流程干预
        interventionRequestById(requestid, otherpara, obj){
            window.openFullWindowHaveBarForWFList(`/workflow/request/ViewRequestForwardSPA.jsp?isintervenor=1&requestid=${requestid}`)
            // Modal.confirm({
            //     content: '确定要干预吗？',
            //     onOk() {
            //         {
            //             window.openFullWindowHaveBarForWFList(`/workflow/request/ViewRequestForwardSPA.jsp?isintervenor=1&requestid=${requestid}`)
            //         }
            //     },
            //     onCancel() {},
            // });
        }
    }
})()